Skip to content

hal: Update hostmot2 encoder to use and expose full 64-bit counts - #4945

Open
BsAtHome wants to merge 1 commit into
LinuxCNC:masterfrom
BsAtHome:hal64_hostmot2-encoder
Open

BsAtHome wants to merge 1 commit into
LinuxCNC:masterfrom
BsAtHome:hal64_hostmot2-encoder

Conversation

@BsAtHome

@BsAtHome BsAtHome commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

After a long wait... This PR updates the hostmot2 encoder code in such way that there no longer occurs any truncation of the encoder counts exposed to HAL and writes full 64-bit counts.

The old interface wrote the counts to a 32-bit HAL target and the HAL migration stage persisted the truncation. This has now been changed. The new HAL interface is fully 64-bit and the internal counters are now exposed directly without truncation. Internal truncation handling has been removed as it is no longer required.

The PR also updates the remaining 64-bit clean HAL interface thingies.

A few instances of stdint.h types were fixed to use the proper rtapi types instead.

Test on hardware required, testers requested

This PR needs to be tested on real hardware. Preferably on hardware that would have overflowed 32-bit counters (i.e. counts that reach > +231-1 and < -231). Please leave a comment if you can test and what your results are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant